package com.ruoyi.voucher.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.voucher.domain.VoucherDetails;
import com.ruoyi.voucher.domain.dto.TemplateSummarySubject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 凭证详情Mapper接口
 * 
 * @author ruoyi
 * @date 2025-02-21
 */
public interface VoucherDetailsMapper extends BaseMapper<VoucherDetails>
{
    /**
     * 查询凭证详情
     * 
     * @param id 凭证详情主键
     * @return 凭证详情
     */
    public VoucherDetails selectVoucherDetailsById(Long id);

    /**
     * 查询凭证详情列表
     * 
     * @param voucherDetails 凭证详情
     * @return 凭证详情集合
     */
    public List<VoucherDetails> selectVoucherDetailsList(VoucherDetails voucherDetails);

    /**
     * 新增凭证详情
     * 
     * @param voucherDetails 凭证详情
     * @return 结果
     */
    public int insertVoucherDetails(VoucherDetails voucherDetails);

    /**
     * 修改凭证详情
     * 
     * @param voucherDetails 凭证详情
     * @return 结果
     */
    public int updateVoucherDetails(VoucherDetails voucherDetails);

    /**
     * 删除凭证详情
     * 
     * @param id 凭证详情主键
     * @return 结果
     */
    public int deleteVoucherDetailsById(Long id);

    /**
     * 批量删除凭证详情
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteVoucherDetailsByIds(Long[] ids);

    public List<VoucherDetails> selectDetailsByVoucherId(Long voucherId);

    List<TemplateSummarySubject> selectDetailsByVoucherIds(@Param("voucherIds") List<Long> voucherIds);
}
